<?php

namespace App\Containers\AppSection\Ban\Traits;

use App\Containers\AppSection\Authentication\Tasks\GetAuthenticatedUserTask;
use function app;

trait UsersBan
{
    public function userIsNotBanned(): bool
    {
        $user = app(GetAuthenticatedUserTask::class)->run();
        return $user->isNotBanned();
    }
}
